define(
	[
		'require',
		'apm/ui/area_select',
		'resource/bootstrap/transition',
		'resource/bootstrap/tab',
		'broada/ui/dialog',
		'../js/business_config_threshold',
		'apm/ui/business_time_ranges',
		'apm/ui/alarm_time/main',
		'apm/ui/myself_select/select'
	],
	function(require){
		var BusinessDetailConfigView = Ember.View.extend({
			classNames: "business-detail-config",

			didInsertElement: function(){
				gridHeightSet();
				this.$().find('.apm-nav-tabs-left>ul a').click(function (e) {
					e.preventDefault()
					$(this).tab('show');
				});
			},

			willDestroyElement: function(){
			},

			WarningPeriod: require('apm/ui/business_time_ranges/main'),

			AreaSelect: require('apm/ui/area_select'),

			Dialog: require('broada/ui/dialog'),

			AlarmTime: require('apm/ui/alarm_time/main'),

			select: require('apm/ui/myself_select/select'),

			ThresholdConfig: require('../js/business_config_threshold').extend({
				actions: {
					saved: function(threshold){
						var me = this;
						var ctrl = this.get("_parentView.controller");
						if(ctrl.get("curEditeThreshold")){
							ctrl.updateThreshold(threshold);
						}else{
							ctrl.addThreshold(threshold);
						}
					}
				}
			})
		});

		APM.BusinessDetailConfigView = BusinessDetailConfigView;
		return BusinessDetailConfigView;
	}
);